package com.design.model.flyweight;

/**
 * @program: study
 * @className: Client
 * @description: TODO
 * @author: kukuxiahuni
 * @create: 2019-06-26 15:03
 * @version: v1.0
 **/
public class Client {

    public static void main(String[] args) {
        FlyweightFactory flyweightFactory = new FlyweightFactory();
        Flyweight flyweight = flyweightFactory.get("x");
        Flyweight flyweightY = flyweightFactory.get("y");
        Flyweight flyweightZ = flyweightFactory.get("z");

        flyweight.operation(1);
        flyweightY.operation(2);
        flyweightZ.operation(3);
    }
}
